<?php
/**
 * Created by PhpStorm.
 * User: sosyuki
 * Date: 2018/6/22
 * Time: 15:06
 */

namespace Drupal\wx_pay_refund\MetadataController;


use EntityDefaultMetadataController;

class WxPayRefundRecordMetadataController extends EntityDefaultMetadataController {

  public function entityPropertyInfo() {
    $info = parent::entityPropertyInfo();
    $properties = &$info[$this->type]['properties'];

    $properties['op_user'] = [
      'label' => t("操作人"),
      'type' => 'user',
      'description' => t("操作人."),
      'schema field' => 'op_user_id',
    ];

    $properties['transaction'] = [
      'label' => t("支付信息"),
      'type' => 'wx_pay_transaction',
      'description' => t("支付信息"),
      'schema field' => 'wx_pay_transaction',
    ];

    $properties['created'] = [
      'label' => t('退款时间'),
      'type' => 'date',
      'schema field' => 'created',
      'description' => t('退款时间.'),
    ];

    return $info;
  }
}
